It has been found that many of the IV-VI compound semiconductors have very useful device properties. Excellent photodetectors, lasers, photo emitter diodes, and electro optical elements have been fabricated. Many of these devices have excellent infrared optical properties and function at relatively modest temperatures. It has been found that when such devices are fabricated in the form of useful structures, surface protective coatings are advantageously employed, particularly when p-n junctions or barrier-forming contacts in thin film structures are used. In the past such coatings have been composed of silicon dioxide or silicon monoxide deposited by conventional means. These coatings provide most of the desired protective coating properties but leave much to be desired in terms of mechanical compatibility. The IV-VI compounds of maximum interest have rather large thermal expansion coefficients that do not match silicon monoxide or dioxide. This means that the protective coatings are under severe stress and tend adversely to affect the electrical properties of the devices. In addition reasonably thick coatings tend to crack or craze particularly when cycled to cryogenic temperatures. In the case of thin film devices such mechanical stress can warp the devices and alter their form.